package plugins.detail;

import kd.bos.context.RequestContext;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * 标准单据列表插件
 */
public class MerchantListInvisible extends AbstractListPlugin implements Plugin {

    @Override
    public void afterBindData(EventObject e) {
        super.afterBindData(e);

        String currentUserName = RequestContext.get().getUserName();

        if ("吕璐君".equals(currentUserName)) {
            this.getView().setVisible(false, "tblreturn");
            this.getView().setVisible(false, "tblnew");
            this.getView().setVisible(false, "tbldel");
            this.getView().setVisible(false, "dcb4_modify");
            this.getView().setVisible(false, "tblsubmit");
            this.getView().setVisible(false, "tblaudit");
            this.getView().setVisible(false, "tbldisable");
            this.getView().setVisible(false, "tblnamehistory");
            this.getView().setVisible(false, "baritemap");

            this.getView().setVisible(false, "dcb4_shoucangrefresh");
            this.getView().setVisible(false, "dcb4_cancelshoucang");

            this.getView().setVisible(true, "dcb4_shoucangmerchant");



        } else if ("胡田甜".equals(currentUserName)) {
            this.getView().setVisible(false, "tblreturn");
            this.getView().setVisible(false, "tblnew");
            this.getView().setVisible(false, "tbldel");
            this.getView().setVisible(false, "dcb4_modify");
            this.getView().setVisible(false, "tblsubmit");
            this.getView().setVisible(false, "tblaudit");
            this.getView().setVisible(false, "tbldisable");
            this.getView().setVisible(false, "tblnamehistory");
            this.getView().setVisible(false, "baritemap");
            this.getView().setVisible(false, "dcb4_shoucangmerchant");
            this.getView().setVisible(false, "dcb4_cancelshoucang");
            this.getView().setVisible(false, "dcb4_shoucangrefresh");
        }
    }
}